home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / x11 / x11r5.zoo / usr / local / bin / startx < prev    next >
Encoding:
Text File  |  1994-11-01  |  1.4 KB  |  55 lines

  1. #!/bin/sh
  2.  
  3. # $XConsortium: startx.cpp,v 1.4 91/08/22 11:41:29 rws Exp $
  4. # This is just a sample implementation of a slightly less primitive 
  5. # interface than xinit.  It looks for user .xinitrc and .xserverrc
  6. # files, then system xinitrc and xserverrc files, else lets xinit choose
  7. # its default.  The system xinitrc should probably do things like check
  8. # for .Xresources files and merge them in, startup up a window manager,
  9. # and pop a clock and serveral xterms.
  10. #
  11. # Site administrators are STRONGLY urged to write nicer versions.
  12.  
  13. userclientrc=$HOME/.xinitrc
  14. userserverrc=$HOME/.xserverrc
  15. sysclientrc=/usr/lib/X11/xinit/xinitrc
  16. sysserverrc=/usr/lib/X11/xinit/xserverrc
  17. clientargs=""
  18. serverargs=""
  19.  
  20. if [ -f $userclientrc ]; then
  21.     clientargs=$userclientrc
  22. else if [ -f $sysclientrc ]; then
  23.     clientargs=$sysclientrc
  24. fi
  25. fi
  26.  
  27. if [ -f $userserverrc ]; then
  28.     serverargs=$userserverrc
  29. else if [ -f $sysserverrc ]; then
  30.     serverargs=$sysserverrc
  31. fi
  32. fi
  33.  
  34. whoseargs="client"
  35. while [ "x$1" != "x" ]; do
  36.     case "$1" in
  37.     /''*|\.*)    if [ "$whoseargs" = "client" ]; then
  38.             clientargs="$1"
  39.         else
  40.             serverargs="$1"
  41.         fi ;;
  42.     --)    whoseargs="server" ;;
  43.     *)    if [ "$whoseargs" = "client" ]; then
  44.             clientargs="$clientargs $1"
  45.         else
  46.             serverargs="$serverargs $1"
  47.         fi ;;
  48.     esac
  49.     shift
  50. done
  51.  
  52. xinit $clientargs -- $serverargs
  53.